# Use the official Golang
# image as the base image
FROM golang:latest

# Set the working directory
# inside    the   container
WORKDIR /app

# Copy the local    source       files
# to the container's working directory
COPY . .

# Build the Golang application
RUN go mod init server
RUN go get github.com/go-sql-driver/mysql
RUN go build -o main .

# Command to run the executable
# when  the    container starts
CMD ./main

